package com.alpaak.bootdemo.alpaak;

import com.alpaak.bootdemo.alpaak.config.AopConfig;
import com.alpaak.bootdemo.alpaak.service.DemoAnnotationService;
import com.alpaak.bootdemo.alpaak.service.DemoMothodService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author liudongkui
 * @desp
 * @datetime 2019/10/18 9:22
 */
public class MainTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext(AopConfig.class);

        DemoAnnotationService annotationService = context.getBean(DemoAnnotationService.class);

        DemoMothodService mothodService = context.getBean(DemoMothodService.class);

        annotationService.add();
        mothodService.add();

        context.close();
    }
}
